import cs.sxh.pojo.Menu;
import cs.sxh.pojo.User;
import cs.sxh.service.MenuService;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author songxh
 * @create 2022-03-23-11:50
 */
public class test {

    @Test
    public void test(){
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("applicationContext.xml");
        MenuService bean = (MenuService) context.getBean("MenuServiceImpl");
        List<Menu> menus = bean.queryMenuByRole(2);
        for (Menu menu : menus) {
            System.out.println(menu);
        }
    }
}
